import {Link} from "react-router"
var Lia =  React.createClass({
	render :function(){
		return (
				<Link data-id={this.props.data.goods_id} to={"home/goods?goods_id="+this.props.data.goods_id}>
					<img src={this.props.data.goods_image_url}/>
					<div>
						<h1>{this.props.data.goods_name}</h1>
						<h2>¥{this.props.data.goods_price}</h2>
						<h3>销量:<b>{this.props.data.goods_salenum}</b></h3>
					</div>
				</Link>
		)
	}
})

export default React.createClass({
	render :function(){
		var obj = this.props.data.map(function(data,index){
			return <Lia data={data} key={index}/>
		})
		return (
			<div className = "list_goods_one" id="list_goods_btn_cla">
				 {obj}
			</div>
		)
	}
})
